home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / LOGIN.ZIP / LOGIN.PPS < prev    next >
Text File  |  1996-05-15  |  5KB  |  164 lines

  1. ;------------ Toxic Logon ----------------------------------------------;
  2. ;  Coder: THe BLaCK aSSaSSiN                                            ;
  3. ;  Date: 15/o5/96                                                       ;
  4. ;  Hours: 1.5                                                           ;
  5. ;                                                                       ;
  6. ;------ Declare Procedures ---------------------------------------------;
  7.   declare procedure writeln()
  8.  
  9. ;------ Veribles -------------------------------------------------------;
  10.   Integer  Pram1, Xstatus, Ystatus, Xhandle, Yhandle, Xpassword, rx, ry
  11.   Integer  Ypassword, Xusernote, Yusernote, DelayTime, NewX, NewY
  12.   String   UserNoteColor, BadPassword, Select, YesBar, NoBar
  13.   String   PWS, EAS, DCS, BLNK, WriteString, LPS
  14.   boolean  newuser
  15.  
  16. ;------ Load CFG files -------------------------------------------------;
  17.   GetToken Pram1
  18.   FOpen 1, PpePath() + "LOGIN.CNF", 2, 0
  19.   FGet 1, Xstatus
  20.   FGet 1, Ystatus
  21.   FGet 1, Xhandle
  22.   FGet 1, Yhandle
  23.   FGet 1, Xpassword
  24.   FGet 1, Ypassword
  25.   FGet 1, Xusernote
  26.   FGet 1, Yusernote
  27.   FGet 1, UserNoteColor
  28.   FGet 1, DelayTime
  29.   FGet 1, NewX
  30.   FGet 1, NewY
  31.   FGet 1, YesBar
  32.   FGet 1, NoBar
  33.   FGet 1, BadPassword
  34.   FGet 1, EAS
  35.   FGet 1, PWS
  36.   FGet 1, DCS
  37.   FGet 1, BLNK
  38.   FGet 1, LPS
  39.   FClose 1
  40.  
  41. ;------ AutoDisconect ------------------------------------------------------;
  42.   If (Pram1 == 76) then
  43.     AnsiPos Xstatus, Ystatus
  44.     Print DCS
  45.     Delay DelayTime
  46.     AnsiPos Xstatus, Ystatus
  47.     print blnk
  48.   endif
  49.  
  50. ;------ First Name ---------------------------------------------------------;
  51.   If (Pram1 == 259) then
  52.     cls
  53.     DispFile PpePath() + "LOGIN.PCB", 0
  54.     AnsiPos Xstatus, Ystatus
  55.     Print EAS
  56.     AnsiPos Xhandle, Yhandle
  57.   endif
  58.  
  59. ;------ Last Name ----------------------------------------------------------;
  60.   If (Pram1 == 260) then
  61.     KbdStuff Chr(13)
  62.   Endif
  63.  
  64. ;------ Password -----------------------------------------------------------;
  65.   If (Pram1 == 148) then
  66.     getuser
  67.     AnsiPos Xusernote, Yusernote
  68.     Print UserNoteColor + "@CITY@"
  69.     AnsiPos Xpassword, Ypassword
  70.     print "            "
  71.     if (onlocal() = False) LPS = "N"
  72.     WriteString = U_PWD
  73.     if (LPS = "N") then
  74.       AnsiPos Xstatus, Ystatus
  75.       print blnk
  76.       AnsiPos Xstatus, Ystatus
  77.       print PWS
  78.       Sprintln "H.--[ Local Window ]-------------."
  79.       Sprintln "| Password:                     |"
  80.       Sprintln "| Usr inpt:                     |"
  81.       Sprintln "| Security:                     |"
  82.       Sprintln "`-------------------------------'"
  83.       Sprint "3H" + U_PWD
  84.       Sprint "3H" + String(U_Sec())
  85.       AnsiPos Xpassword, Ypassword
  86.       Writeln()
  87.     endif
  88.     kbdstuff WriteString
  89.   endif
  90.  
  91. ;------ WrongPassword ------------------------------------------------------;
  92.   If (Pram1 == 92) then
  93.     AnsiPos Xstatus, Ystatus
  94.     print blnk
  95.     AnsiPos Xstatus, Ystatus
  96.     Print BadPassword
  97.     Delay DelayTime
  98.     AnsiPos Xstatus, Ystatus
  99.     print blnk
  100.   endif
  101.  
  102. ;------ New User -----------------------------------------------------------;
  103.   if (Pram1 == 53) then
  104.     ansipos NewX, NewY
  105.     print NoBar
  106.     newuser = TRUE
  107.     while (select <> chr(13)) do
  108.       select = ""
  109.       while (select = "") do
  110.         select = inkey()
  111.       endwhile
  112.       ansipos NewX, NewY
  113.       if (select == "RIGHT") print YesBar
  114.       if (select == "LEFT") print NoBar
  115.       if (select == "LEFT") newuser = TRUE
  116.       if (select == "RIGHT") newuser = FALSE
  117.     endwhile
  118.     if (newuser == TRUE) kbdstuff "C" + chr(13)
  119.     if (newuser == FALSE) kbdstuff "R" + chr(13)
  120.   endif
  121.  
  122. ;------ Writeln proc -------------------------------------------------------;
  123.   procedure writeln()
  124.     WriteString = ""
  125.     integer x, rl
  126.     string KBD
  127.     x = getx()
  128.     while (KBD <> chr(13)) do
  129.       kbd = ""
  130.       while (KBD = "") do
  131.         kbd = Upper(inkey())
  132.         if (Len(KBD) > 1) KBD = ""
  133.         if ((rl = 0) && (KBD = chr(13))) KBD = ""
  134.         if (RL = 12) if (KBD <> chr(8)) if (KBD <> chr(13)) KBD = ""
  135.       endwhile
  136.       if ((KBD = chr(8))&&(RL <> 0)) then
  137.         dec RL
  138.         WriteString = Left(WriteString, Len(WriteString)-1)
  139.       elseif ((KBD <> chr(13))&&(KBD <> chr(8))) then
  140.         WriteString = WriteString + KBD
  141.         Inc RL
  142.       endif
  143.       if (KBD = chr(8)) then
  144.         if (GetX() > X) then
  145.           rx = getx()
  146.           ry = gety()
  147.           Sprint "3H" + WriteString + " "
  148.           Sprint ""+string(ry)+";"+string(rx)+"H" 
  149.           Print Chr(8) + " " + Chr(8)
  150.         endif
  151.       else
  152.         if (kbd <> chr(13)) then
  153.           rx = getx()
  154.           ry = gety()
  155.           Sprint "3H" + WriteString
  156.           Sprint ""+string(ry)+";"+string(rx)+"H"
  157.           print "."
  158.         endif
  159.       endif
  160.     endwhile
  161.   endproc
  162.  
  163. ;------ End Of Coding ------------------------------------------------------;
  164.